package com.boot.controller;


import com.boot.mapper.EmployeeMapper;
import com.boot.pojo.Employee;
import com.boot.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/employee")
public class EmployeeController {

    @Autowired
    private EmployeeService employeeService;

    @RequestMapping("/list")
    public List<Employee> find() {
        List<Employee> employees = employeeService.findAll();
        return employees;
    }
}
